package com.yuyou.fn.portal.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;

@Document
public class CourseFilterCondConfig implements Serializable {

    public static class Item extends HashMap<String,Object> implements Comparable<Item>,Serializable {


        public Item(){

        }

        public Item(String name, String value) {
            put("name",name);
            put("value",value);
        }


        @Override
        public int compareTo(Item o) {
            return ((String)this.get("value")).compareTo((String)o.get("value"));
        }
    }

    @Id
    private Long areaTeamId ;


    private List<Item> periods ;

    public Long getAreaTeamId() {
        return areaTeamId;
    }

    public void setAreaTeamId(Long areaTeamId) {
        this.areaTeamId = areaTeamId;
    }

    public List<Item> getPeriods() {
        return periods;
    }

    public void setPeriods(List<Item> periods) {
        this.periods = periods;
    }
}
